home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 23
/
Aminet 23 (1998)(GTI - Schatztruhe)[!][Feb 1998].iso
/
Aminet
/
dev
/
misc
/
gms_dev.lha
/
GMSDev
/
Source
/
E
/
Screens
/
HiResScreen.e
< prev
next >
Wrap
Text File
|
1997-12-05
|
2KB
|
60 lines
/* HiRes Picture Display
** ---------------------
** Opens a screen of 640 pixels width in HIRES mode. You can even try
** SuperHiRes (SHIRES) if you change the appropriate flag in the GameScreen
** structure.
*/
MODULE 'dpkernel','dpkernel/dpkernel','graphics/pictures','files/files'
MODULE 'screens','system/register','system/modules','input/joydata'
MODULE 'graphics/screens','graphics/blitter'
PROC main()
DEF screen :PTR TO screen,
pic :PTR TO picture,
picfile :filename,
scrmodule :PTR TO module,
joydata :PTR TO joydata
picfile := [ ID_FILENAME, 'GMS:demos/data/PIC.Pic640x256']:filename
IF dpkbase := OpenLibrary('GMS:libs/dpkernel.library',0)
IF (scrmodule := Init([TAGS_MODULE,NIL,
MODA_NUMBER, MOD_SCREENS,
MODA_TABLETYPE, JMP_AMIGAE,
TAGEND], NIL))
scrbase := scrmodule.modbase
IF (pic := Load(picfile, ID_PICTURE))
screen := Get(ID_SCREEN)
CopyStructure(pic,screen)
screen.memptr1 := pic.bitmap.data
screen.width := 640
screen.height := 256
screen.scrmode := HIRES OR LACED
IF (joydata := Init(Get(ID_JOYDATA),NIL))
IF (Init(screen,NIL))
Display(screen)
Query(joydata)
REPEAT
Query(joydata)
WaitAVBL()
UNTIL (joydata.buttons AND JD_LMB)
Free(screen)
ENDIF
Free(joydata)
ENDIF
Free(pic)
ENDIF
Free(scrmodule)
ENDIF
CloseDPK()
ENDIF
ENDPROC